<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>封装自己的slice方法(数组)</title>
	<script>
		var arr=[1,2,3,4,5,6,7,8,9,10];
		function getSlice(arr,start,end){
			var arr1=[];
			for (var i = start; i <end ; i++) {
				arr1.push(arr[i]);
			}
			console.log(arr1);
		}
		getSlice(arr,0,1);
	</script>
</head>
<body>
	
</body>
</html>